# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=unicode-character-database
pkgver=10.0.0
pkgrel=2
pkgdesc="Unicode Character Database"
arch=(any)
license=(BSD)
url="http://www.unicode.org/"
source=("UCD-$pkgver.zip::http://www.unicode.org/Public/zipped/$pkgver/UCD.zip"
        "Unihan-$pkgver.zip::http://www.unicode.org/Public/zipped/$pkgver/Unihan.zip"
        LICENSE)
noextract=({UCD,Unihan}-$pkgver.zip)
sha256sums=('cb26d649f8bac8b12f69e2fbcd77d1759ecdcd7c8e8f1c4385a9c5a36cf14891'
            '01232063a8529636cf155ba7a1dbad329cb2e63acde83a3d607b5eafa8f933a5'
            '22afb7cd85b74a197cb96af709e2da5a814235331c52d866b3208dbdda6807df')

package() {
  for _f in UCD Unihan; do
    install -Dm644 $_f-$pkgver.zip "$pkgdir/usr/share/unicode/$_f.zip"
    bsdtar -C "$pkgdir/usr/share/unicode" -x --no-same-owner --no-same-permissions -f $_f-$pkgver.zip
  done

  ln -s unicode "$pkgdir/usr/share/$pkgname"

  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
